<h3>Mail Ekle</h3>

<form method="post" action="javascript: void(0)" id="add_subscriber">
    <input type="hidden" name="group_id" value="<?php echo $group_id ?>" />
	
    <!-- Tekli Ekleme -->
    <input type="radio" name="insert_type" value="single" checked="1"/> Tekli ekleme <br />
    <input type="radio" name="insert_type" value="multiple" /> Çoklu Ekleme
    
    <table class="form" style="width: 600px" id="single_area">
        <tr>
            <td class="left">E posta adresi</td>
            <td class="right"><input type="text" name="address" /></td>
        </tr>
        <tr>
            <td class="left">Adı</td>
            <td class="right"><input type="text" name="firstname" /></td>
        </tr>
        <tr>
            <td class="left">Soyadı</td>
            <td class="right"><input type="text" name="lastname" /></td>
        </tr>
    </tr>
    </table>
    
    <!-- Çoklu Ekleme -->
    <table class="form" style="width: 600px; display: none" id="multiple_area">
        <tr>
            <td class="left">E posta adresleri</td>
            <td class="right"><textarea name="addresses" rows="16" cols="40"></textarea>
        </tr> 
    </table>
    
    <p><input class="button blue small" type="submit" value="Ekle!" onclick="return ajax_start(this.form.id, '<?php echo uri_string() ?>')" /></p>

</form>

<script type="text/javascript" charset="utf-8">
	jQuery(':radio[name="insert_type"]').click(function(){
		var insert_type = jQuery(this).val();
		
		if(insert_type == 'single') {
			jQuery('#multiple_area').slideUp('fast', function(){
				jQuery('#single_area').slideDown();	
			});
		} else {
			jQuery('#single_area').slideUp('fast', function(){
				jQuery('#multiple_area').slideDown();	
			});
		}
	});
</script>



